/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: AggregateProtocol.proto

package org.apache.eagle.storage.hbase.query.coprocessor.generated;

import com.google.protobuf.AbstractMessage;

public final class AggregateProtos {
  private AggregateProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public interface EntityDefinitionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:EntityDefinition)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required bytes byte_array = 1;</code>
     */
    boolean hasByteArray();
    /**
     * <code>required bytes byte_array = 1;</code>
     */
    com.google.protobuf.ByteString getByteArray();
  }
  /**
   * Protobuf type {@code EntityDefinition}
   */
  public static final class EntityDefinition extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:EntityDefinition)
      EntityDefinitionOrBuilder {
    // Use EntityDefinition.newBuilder() to construct.
    private EntityDefinition(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private EntityDefinition(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final EntityDefinition defaultInstance;
    public static EntityDefinition getDefaultInstance() {
      return defaultInstance;
    }

    public EntityDefinition getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private EntityDefinition(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              byteArray_ = input.readBytes();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return AggregateProtos.internal_static_EntityDefinition_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return AggregateProtos.internal_static_EntityDefinition_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              AggregateProtos.EntityDefinition.class, AggregateProtos.EntityDefinition.Builder.class);
    }

    public static com.google.protobuf.Parser<EntityDefinition> PARSER =
        new com.google.protobuf.AbstractParser<EntityDefinition>() {
      public EntityDefinition parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new EntityDefinition(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<EntityDefinition> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int BYTE_ARRAY_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString byteArray_;
    /**
     * <code>required bytes byte_array = 1;</code>
     */
    public boolean hasByteArray() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required bytes byte_array = 1;</code>
     */
    public com.google.protobuf.ByteString getByteArray() {
      return byteArray_;
    }

    private void initFields() {
      byteArray_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasByteArray()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, byteArray_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, byteArray_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof AggregateProtos.EntityDefinition)) {
        return super.equals(obj);
      }
      AggregateProtos.EntityDefinition other = (AggregateProtos.EntityDefinition) obj;

      boolean result = true;
      result = result && (hasByteArray() == other.hasByteArray());
      if (hasByteArray()) {
        result = result && getByteArray()
            .equals(other.getByteArray());
      }
      result = result &&
          getUnknownFields().equals(other.getUnknownFields());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasByteArray()) {
        hash = (37 * hash) + BYTE_ARRAY_FIELD_NUMBER;
        hash = (53 * hash) + getByteArray().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static AggregateProtos.EntityDefinition parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.EntityDefinition parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.EntityDefinition parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.EntityDefinition parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.EntityDefinition parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.EntityDefinition parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static AggregateProtos.EntityDefinition parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static AggregateProtos.EntityDefinition parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static AggregateProtos.EntityDefinition parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.EntityDefinition parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(AggregateProtos.EntityDefinition prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code EntityDefinition}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:EntityDefinition)
        AggregateProtos.EntityDefinitionOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return AggregateProtos.internal_static_EntityDefinition_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return AggregateProtos.internal_static_EntityDefinition_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                AggregateProtos.EntityDefinition.class, AggregateProtos.EntityDefinition.Builder.class);
      }

      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.EntityDefinition.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        byteArray_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return AggregateProtos.internal_static_EntityDefinition_descriptor;
      }

      public AggregateProtos.EntityDefinition getDefaultInstanceForType() {
        return AggregateProtos.EntityDefinition.getDefaultInstance();
      }

      public AggregateProtos.EntityDefinition build() {
        AggregateProtos.EntityDefinition result = buildPartial();
        if (!result.isInitialized()) {
          throw AbstractMessage.Builder.newUninitializedMessageException(result);
        }
        return result;
      }

      public AggregateProtos.EntityDefinition buildPartial() {
        AggregateProtos.EntityDefinition result = new AggregateProtos.EntityDefinition(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.byteArray_ = byteArray_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof AggregateProtos.EntityDefinition) {
          return mergeFrom((AggregateProtos.EntityDefinition)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(AggregateProtos.EntityDefinition other) {
        if (other == AggregateProtos.EntityDefinition.getDefaultInstance()) return this;
        if (other.hasByteArray()) {
          setByteArray(other.getByteArray());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasByteArray()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        AggregateProtos.EntityDefinition parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (AggregateProtos.EntityDefinition) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.ByteString byteArray_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public boolean hasByteArray() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public com.google.protobuf.ByteString getByteArray() {
        return byteArray_;
      }
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public Builder setByteArray(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        byteArray_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public Builder clearByteArray() {
        bitField0_ = (bitField0_ & ~0x00000001);
        byteArray_ = getDefaultInstance().getByteArray();
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:EntityDefinition)
    }

    static {
      defaultInstance = new EntityDefinition(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:EntityDefinition)
  }

  public interface AggregateResultOrBuilder extends
      // @@protoc_insertion_point(interface_extends:AggregateResult)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required bytes byte_array = 1;</code>
     */
    boolean hasByteArray();
    /**
     * <code>required bytes byte_array = 1;</code>
     */
    com.google.protobuf.ByteString getByteArray();
  }
  /**
   * Protobuf type {@code AggregateResult}
   */
  public static final class AggregateResult extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:AggregateResult)
      AggregateResultOrBuilder {
    // Use AggregateResult.newBuilder() to construct.
    private AggregateResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private AggregateResult(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final AggregateResult defaultInstance;
    public static AggregateResult getDefaultInstance() {
      return defaultInstance;
    }

    public AggregateResult getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private AggregateResult(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              byteArray_ = input.readBytes();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return AggregateProtos.internal_static_AggregateResult_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return AggregateProtos.internal_static_AggregateResult_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              AggregateProtos.AggregateResult.class, AggregateProtos.AggregateResult.Builder.class);
    }

    public static com.google.protobuf.Parser<AggregateResult> PARSER =
        new com.google.protobuf.AbstractParser<AggregateResult>() {
      public AggregateResult parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new AggregateResult(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<AggregateResult> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int BYTE_ARRAY_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString byteArray_;
    /**
     * <code>required bytes byte_array = 1;</code>
     */
    public boolean hasByteArray() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required bytes byte_array = 1;</code>
     */
    public com.google.protobuf.ByteString getByteArray() {
      return byteArray_;
    }

    private void initFields() {
      byteArray_ = com.google.protobuf.ByteString.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasByteArray()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, byteArray_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, byteArray_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof AggregateProtos.AggregateResult)) {
        return super.equals(obj);
      }
      AggregateProtos.AggregateResult other = (AggregateProtos.AggregateResult) obj;

      boolean result = true;
      result = result && (hasByteArray() == other.hasByteArray());
      if (hasByteArray()) {
        result = result && getByteArray()
            .equals(other.getByteArray());
      }
      result = result &&
          getUnknownFields().equals(other.getUnknownFields());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasByteArray()) {
        hash = (37 * hash) + BYTE_ARRAY_FIELD_NUMBER;
        hash = (53 * hash) + getByteArray().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static AggregateProtos.AggregateResult parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.AggregateResult parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.AggregateResult parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.AggregateResult parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.AggregateResult parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.AggregateResult parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static AggregateProtos.AggregateResult parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static AggregateProtos.AggregateResult parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static AggregateProtos.AggregateResult parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.AggregateResult parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(AggregateProtos.AggregateResult prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code AggregateResult}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:AggregateResult)
        AggregateProtos.AggregateResultOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return AggregateProtos.internal_static_AggregateResult_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return AggregateProtos.internal_static_AggregateResult_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                AggregateProtos.AggregateResult.class, AggregateProtos.AggregateResult.Builder.class);
      }

      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.AggregateResult.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        byteArray_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return AggregateProtos.internal_static_AggregateResult_descriptor;
      }

      public AggregateProtos.AggregateResult getDefaultInstanceForType() {
        return AggregateProtos.AggregateResult.getDefaultInstance();
      }

      public AggregateProtos.AggregateResult build() {
        AggregateProtos.AggregateResult result = buildPartial();
        if (!result.isInitialized()) {
          throw AbstractMessage.Builder.newUninitializedMessageException(result);
        }
        return result;
      }

      public AggregateProtos.AggregateResult buildPartial() {
        AggregateProtos.AggregateResult result = new AggregateProtos.AggregateResult(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.byteArray_ = byteArray_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof AggregateProtos.AggregateResult) {
          return mergeFrom((AggregateProtos.AggregateResult)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(AggregateProtos.AggregateResult other) {
        if (other == AggregateProtos.AggregateResult.getDefaultInstance()) return this;
        if (other.hasByteArray()) {
          setByteArray(other.getByteArray());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasByteArray()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        AggregateProtos.AggregateResult parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (AggregateProtos.AggregateResult) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private com.google.protobuf.ByteString byteArray_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public boolean hasByteArray() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public com.google.protobuf.ByteString getByteArray() {
        return byteArray_;
      }
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public Builder setByteArray(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        byteArray_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required bytes byte_array = 1;</code>
       */
      public Builder clearByteArray() {
        bitField0_ = (bitField0_ & ~0x00000001);
        byteArray_ = getDefaultInstance().getByteArray();
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:AggregateResult)
    }

    static {
      defaultInstance = new AggregateResult(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:AggregateResult)
  }

  public interface AggregateRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:AggregateRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    boolean hasEntityDefinition();
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    AggregateProtos.EntityDefinition getEntityDefinition();
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder();

    /**
     * <code>required .Scan scan = 2;</code>
     */
    boolean hasScan();
    /**
     * <code>required .Scan scan = 2;</code>
     */
    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan();
    /**
     * <code>required .Scan scan = 2;</code>
     */
    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder();

    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    com.google.protobuf.ProtocolStringList
        getGroupbyFieldsList();
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    int getGroupbyFieldsCount();
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    java.lang.String getGroupbyFields(int index);
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    com.google.protobuf.ByteString
        getGroupbyFieldsBytes(int index);

    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    java.util.List<com.google.protobuf.ByteString> getAggregateFuncTypesList();
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    int getAggregateFuncTypesCount();
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    com.google.protobuf.ByteString getAggregateFuncTypes(int index);

    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    com.google.protobuf.ProtocolStringList
        getAggregatedFieldsList();
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    int getAggregatedFieldsCount();
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    java.lang.String getAggregatedFields(int index);
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    com.google.protobuf.ByteString
        getAggregatedFieldsBytes(int index);
  }
  /**
   * Protobuf type {@code AggregateRequest}
   */
  public static final class AggregateRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:AggregateRequest)
      AggregateRequestOrBuilder {
    // Use AggregateRequest.newBuilder() to construct.
    private AggregateRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private AggregateRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final AggregateRequest defaultInstance;
    public static AggregateRequest getDefaultInstance() {
      return defaultInstance;
    }

    public AggregateRequest getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private AggregateRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              AggregateProtos.EntityDefinition.Builder subBuilder = null;
              if (((bitField0_ & 0x00000001) == 0x00000001)) {
                subBuilder = entityDefinition_.toBuilder();
              }
              entityDefinition_ = input.readMessage(AggregateProtos.EntityDefinition.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(entityDefinition_);
                entityDefinition_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000001;
              break;
            }
            case 18: {
              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder subBuilder = null;
              if (((bitField0_ & 0x00000002) == 0x00000002)) {
                subBuilder = scan_.toBuilder();
              }
              scan_ = input.readMessage(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(scan_);
                scan_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 26: {
              com.google.protobuf.ByteString bs = input.readBytes();
              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
                groupbyFields_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000004;
              }
              groupbyFields_.add(bs);
              break;
            }
            case 34: {
              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
                aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
                mutable_bitField0_ |= 0x00000008;
              }
              aggregateFuncTypes_.add(input.readBytes());
              break;
            }
            case 42: {
              com.google.protobuf.ByteString bs = input.readBytes();
              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
                aggregatedFields_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000010;
              }
              aggregatedFields_.add(bs);
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
          groupbyFields_ = groupbyFields_.getUnmodifiableView();
        }
        if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
          aggregateFuncTypes_ = java.util.Collections.unmodifiableList(aggregateFuncTypes_);
        }
        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
          aggregatedFields_ = aggregatedFields_.getUnmodifiableView();
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return AggregateProtos.internal_static_AggregateRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return AggregateProtos.internal_static_AggregateRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              AggregateProtos.AggregateRequest.class, AggregateProtos.AggregateRequest.Builder.class);
    }

    public static com.google.protobuf.Parser<AggregateRequest> PARSER =
        new com.google.protobuf.AbstractParser<AggregateRequest>() {
      public AggregateRequest parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new AggregateRequest(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<AggregateRequest> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int ENTITY_DEFINITION_FIELD_NUMBER = 1;
    private AggregateProtos.EntityDefinition entityDefinition_;
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    public boolean hasEntityDefinition() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    public AggregateProtos.EntityDefinition getEntityDefinition() {
      return entityDefinition_;
    }
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    public AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder() {
      return entityDefinition_;
    }

    public static final int SCAN_FIELD_NUMBER = 2;
    private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_;
    /**
     * <code>required .Scan scan = 2;</code>
     */
    public boolean hasScan() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>required .Scan scan = 2;</code>
     */
    public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
      return scan_;
    }
    /**
     * <code>required .Scan scan = 2;</code>
     */
    public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
      return scan_;
    }

    public static final int GROUPBY_FIELDS_FIELD_NUMBER = 3;
    private com.google.protobuf.LazyStringList groupbyFields_;
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getGroupbyFieldsList() {
      return groupbyFields_;
    }
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public int getGroupbyFieldsCount() {
      return groupbyFields_.size();
    }
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public java.lang.String getGroupbyFields(int index) {
      return groupbyFields_.get(index);
    }
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public com.google.protobuf.ByteString
        getGroupbyFieldsBytes(int index) {
      return groupbyFields_.getByteString(index);
    }

    public static final int AGGREGATE_FUNC_TYPES_FIELD_NUMBER = 4;
    private java.util.List<com.google.protobuf.ByteString> aggregateFuncTypes_;
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    public java.util.List<com.google.protobuf.ByteString>
        getAggregateFuncTypesList() {
      return aggregateFuncTypes_;
    }
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    public int getAggregateFuncTypesCount() {
      return aggregateFuncTypes_.size();
    }
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    public com.google.protobuf.ByteString getAggregateFuncTypes(int index) {
      return aggregateFuncTypes_.get(index);
    }

    public static final int AGGREGATED_FIELDS_FIELD_NUMBER = 5;
    private com.google.protobuf.LazyStringList aggregatedFields_;
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getAggregatedFieldsList() {
      return aggregatedFields_;
    }
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public int getAggregatedFieldsCount() {
      return aggregatedFields_.size();
    }
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public java.lang.String getAggregatedFields(int index) {
      return aggregatedFields_.get(index);
    }
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public com.google.protobuf.ByteString
        getAggregatedFieldsBytes(int index) {
      return aggregatedFields_.getByteString(index);
    }

    private void initFields() {
      entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
      scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
      groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      aggregateFuncTypes_ = java.util.Collections.emptyList();
      aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasEntityDefinition()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasScan()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getEntityDefinition().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getScan().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, entityDefinition_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(2, scan_);
      }
      for (int i = 0; i < groupbyFields_.size(); i++) {
        output.writeBytes(3, groupbyFields_.getByteString(i));
      }
      for (int i = 0; i < aggregateFuncTypes_.size(); i++) {
        output.writeBytes(4, aggregateFuncTypes_.get(i));
      }
      for (int i = 0; i < aggregatedFields_.size(); i++) {
        output.writeBytes(5, aggregatedFields_.getByteString(i));
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, entityDefinition_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, scan_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < groupbyFields_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(groupbyFields_.getByteString(i));
        }
        size += dataSize;
        size += 1 * getGroupbyFieldsList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < aggregateFuncTypes_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(aggregateFuncTypes_.get(i));
        }
        size += dataSize;
        size += 1 * getAggregateFuncTypesList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < aggregatedFields_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(aggregatedFields_.getByteString(i));
        }
        size += dataSize;
        size += 1 * getAggregatedFieldsList().size();
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof AggregateProtos.AggregateRequest)) {
        return super.equals(obj);
      }
      AggregateProtos.AggregateRequest other = (AggregateProtos.AggregateRequest) obj;

      boolean result = true;
      result = result && (hasEntityDefinition() == other.hasEntityDefinition());
      if (hasEntityDefinition()) {
        result = result && getEntityDefinition()
            .equals(other.getEntityDefinition());
      }
      result = result && (hasScan() == other.hasScan());
      if (hasScan()) {
        result = result && getScan()
            .equals(other.getScan());
      }
      result = result && getGroupbyFieldsList()
          .equals(other.getGroupbyFieldsList());
      result = result && getAggregateFuncTypesList()
          .equals(other.getAggregateFuncTypesList());
      result = result && getAggregatedFieldsList()
          .equals(other.getAggregatedFieldsList());
      result = result &&
          getUnknownFields().equals(other.getUnknownFields());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasEntityDefinition()) {
        hash = (37 * hash) + ENTITY_DEFINITION_FIELD_NUMBER;
        hash = (53 * hash) + getEntityDefinition().hashCode();
      }
      if (hasScan()) {
        hash = (37 * hash) + SCAN_FIELD_NUMBER;
        hash = (53 * hash) + getScan().hashCode();
      }
      if (getGroupbyFieldsCount() > 0) {
        hash = (37 * hash) + GROUPBY_FIELDS_FIELD_NUMBER;
        hash = (53 * hash) + getGroupbyFieldsList().hashCode();
      }
      if (getAggregateFuncTypesCount() > 0) {
        hash = (37 * hash) + AGGREGATE_FUNC_TYPES_FIELD_NUMBER;
        hash = (53 * hash) + getAggregateFuncTypesList().hashCode();
      }
      if (getAggregatedFieldsCount() > 0) {
        hash = (37 * hash) + AGGREGATED_FIELDS_FIELD_NUMBER;
        hash = (53 * hash) + getAggregatedFieldsList().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static AggregateProtos.AggregateRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.AggregateRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.AggregateRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.AggregateRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.AggregateRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.AggregateRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static AggregateProtos.AggregateRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static AggregateProtos.AggregateRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static AggregateProtos.AggregateRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.AggregateRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(AggregateProtos.AggregateRequest prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code AggregateRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:AggregateRequest)
        AggregateProtos.AggregateRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return AggregateProtos.internal_static_AggregateRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return AggregateProtos.internal_static_AggregateRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                AggregateProtos.AggregateRequest.class, AggregateProtos.AggregateRequest.Builder.class);
      }

      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.AggregateRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getEntityDefinitionFieldBuilder();
          getScanFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        if (entityDefinitionBuilder_ == null) {
          entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
        } else {
          entityDefinitionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        if (scanBuilder_ == null) {
          scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
        } else {
          scanBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000004);
        aggregateFuncTypes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return AggregateProtos.internal_static_AggregateRequest_descriptor;
      }

      public AggregateProtos.AggregateRequest getDefaultInstanceForType() {
        return AggregateProtos.AggregateRequest.getDefaultInstance();
      }

      public AggregateProtos.AggregateRequest build() {
        AggregateProtos.AggregateRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw AbstractMessage.Builder.newUninitializedMessageException(result);
        }
        return result;
      }

      public AggregateProtos.AggregateRequest buildPartial() {
        AggregateProtos.AggregateRequest result = new AggregateProtos.AggregateRequest(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (entityDefinitionBuilder_ == null) {
          result.entityDefinition_ = entityDefinition_;
        } else {
          result.entityDefinition_ = entityDefinitionBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (scanBuilder_ == null) {
          result.scan_ = scan_;
        } else {
          result.scan_ = scanBuilder_.build();
        }
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          groupbyFields_ = groupbyFields_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.groupbyFields_ = groupbyFields_;
        if (((bitField0_ & 0x00000008) == 0x00000008)) {
          aggregateFuncTypes_ = java.util.Collections.unmodifiableList(aggregateFuncTypes_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.aggregateFuncTypes_ = aggregateFuncTypes_;
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          aggregatedFields_ = aggregatedFields_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.aggregatedFields_ = aggregatedFields_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof AggregateProtos.AggregateRequest) {
          return mergeFrom((AggregateProtos.AggregateRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(AggregateProtos.AggregateRequest other) {
        if (other == AggregateProtos.AggregateRequest.getDefaultInstance()) return this;
        if (other.hasEntityDefinition()) {
          mergeEntityDefinition(other.getEntityDefinition());
        }
        if (other.hasScan()) {
          mergeScan(other.getScan());
        }
        if (!other.groupbyFields_.isEmpty()) {
          if (groupbyFields_.isEmpty()) {
            groupbyFields_ = other.groupbyFields_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureGroupbyFieldsIsMutable();
            groupbyFields_.addAll(other.groupbyFields_);
          }
          onChanged();
        }
        if (!other.aggregateFuncTypes_.isEmpty()) {
          if (aggregateFuncTypes_.isEmpty()) {
            aggregateFuncTypes_ = other.aggregateFuncTypes_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureAggregateFuncTypesIsMutable();
            aggregateFuncTypes_.addAll(other.aggregateFuncTypes_);
          }
          onChanged();
        }
        if (!other.aggregatedFields_.isEmpty()) {
          if (aggregatedFields_.isEmpty()) {
            aggregatedFields_ = other.aggregatedFields_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureAggregatedFieldsIsMutable();
            aggregatedFields_.addAll(other.aggregatedFields_);
          }
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasEntityDefinition()) {
          
          return false;
        }
        if (!hasScan()) {
          
          return false;
        }
        if (!getEntityDefinition().isInitialized()) {
          
          return false;
        }
        if (!getScan().isInitialized()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        AggregateProtos.AggregateRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (AggregateProtos.AggregateRequest) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private AggregateProtos.EntityDefinition entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder> entityDefinitionBuilder_;
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public boolean hasEntityDefinition() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public AggregateProtos.EntityDefinition getEntityDefinition() {
        if (entityDefinitionBuilder_ == null) {
          return entityDefinition_;
        } else {
          return entityDefinitionBuilder_.getMessage();
        }
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder setEntityDefinition(AggregateProtos.EntityDefinition value) {
        if (entityDefinitionBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          entityDefinition_ = value;
          onChanged();
        } else {
          entityDefinitionBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder setEntityDefinition(
          AggregateProtos.EntityDefinition.Builder builderForValue) {
        if (entityDefinitionBuilder_ == null) {
          entityDefinition_ = builderForValue.build();
          onChanged();
        } else {
          entityDefinitionBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder mergeEntityDefinition(AggregateProtos.EntityDefinition value) {
        if (entityDefinitionBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              entityDefinition_ != AggregateProtos.EntityDefinition.getDefaultInstance()) {
            entityDefinition_ =
              AggregateProtos.EntityDefinition.newBuilder(entityDefinition_).mergeFrom(value).buildPartial();
          } else {
            entityDefinition_ = value;
          }
          onChanged();
        } else {
          entityDefinitionBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder clearEntityDefinition() {
        if (entityDefinitionBuilder_ == null) {
          entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
          onChanged();
        } else {
          entityDefinitionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public AggregateProtos.EntityDefinition.Builder getEntityDefinitionBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getEntityDefinitionFieldBuilder().getBuilder();
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder() {
        if (entityDefinitionBuilder_ != null) {
          return entityDefinitionBuilder_.getMessageOrBuilder();
        } else {
          return entityDefinition_;
        }
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder>
          getEntityDefinitionFieldBuilder() {
        if (entityDefinitionBuilder_ == null) {
          entityDefinitionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder>(
                  getEntityDefinition(),
                  getParentForChildren(),
                  isClean());
          entityDefinition_ = null;
        }
        return entityDefinitionBuilder_;
      }

      private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> scanBuilder_;
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public boolean hasScan() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
        if (scanBuilder_ == null) {
          return scan_;
        } else {
          return scanBuilder_.getMessage();
        }
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder setScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
        if (scanBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          scan_ = value;
          onChanged();
        } else {
          scanBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder setScan(
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder builderForValue) {
        if (scanBuilder_ == null) {
          scan_ = builderForValue.build();
          onChanged();
        } else {
          scanBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder mergeScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
        if (scanBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              scan_ != org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance()) {
            scan_ =
              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.newBuilder(scan_).mergeFrom(value).buildPartial();
          } else {
            scan_ = value;
          }
          onChanged();
        } else {
          scanBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder clearScan() {
        if (scanBuilder_ == null) {
          scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
          onChanged();
        } else {
          scanBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder getScanBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getScanFieldBuilder().getBuilder();
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
        if (scanBuilder_ != null) {
          return scanBuilder_.getMessageOrBuilder();
        } else {
          return scan_;
        }
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> 
          getScanFieldBuilder() {
        if (scanBuilder_ == null) {
          scanBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder>(
                  getScan(),
                  getParentForChildren(),
                  isClean());
          scan_ = null;
        }
        return scanBuilder_;
      }

      private com.google.protobuf.LazyStringList groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureGroupbyFieldsIsMutable() {
        if (!((bitField0_ & 0x00000004) == 0x00000004)) {
          groupbyFields_ = new com.google.protobuf.LazyStringArrayList(groupbyFields_);
          bitField0_ |= 0x00000004;
         }
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getGroupbyFieldsList() {
        return groupbyFields_.getUnmodifiableView();
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public int getGroupbyFieldsCount() {
        return groupbyFields_.size();
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public java.lang.String getGroupbyFields(int index) {
        return groupbyFields_.get(index);
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public com.google.protobuf.ByteString
          getGroupbyFieldsBytes(int index) {
        return groupbyFields_.getByteString(index);
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder setGroupbyFields(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupbyFieldsIsMutable();
        groupbyFields_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder addGroupbyFields(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupbyFieldsIsMutable();
        groupbyFields_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder addAllGroupbyFields(
          java.lang.Iterable<java.lang.String> values) {
        ensureGroupbyFieldsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, groupbyFields_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder clearGroupbyFields() {
        groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder addGroupbyFieldsBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupbyFieldsIsMutable();
        groupbyFields_.add(value);
        onChanged();
        return this;
      }

      private java.util.List<com.google.protobuf.ByteString> aggregateFuncTypes_ = java.util.Collections.emptyList();
      private void ensureAggregateFuncTypesIsMutable() {
        if (!((bitField0_ & 0x00000008) == 0x00000008)) {
          aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>(aggregateFuncTypes_);
          bitField0_ |= 0x00000008;
         }
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public java.util.List<com.google.protobuf.ByteString>
          getAggregateFuncTypesList() {
        return java.util.Collections.unmodifiableList(aggregateFuncTypes_);
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public int getAggregateFuncTypesCount() {
        return aggregateFuncTypes_.size();
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public com.google.protobuf.ByteString getAggregateFuncTypes(int index) {
        return aggregateFuncTypes_.get(index);
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder setAggregateFuncTypes(
          int index, com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregateFuncTypesIsMutable();
        aggregateFuncTypes_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder addAggregateFuncTypes(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregateFuncTypesIsMutable();
        aggregateFuncTypes_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder addAllAggregateFuncTypes(
          java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
        ensureAggregateFuncTypesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, aggregateFuncTypes_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder clearAggregateFuncTypes() {
        aggregateFuncTypes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringList aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureAggregatedFieldsIsMutable() {
        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
          aggregatedFields_ = new com.google.protobuf.LazyStringArrayList(aggregatedFields_);
          bitField0_ |= 0x00000010;
         }
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getAggregatedFieldsList() {
        return aggregatedFields_.getUnmodifiableView();
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public int getAggregatedFieldsCount() {
        return aggregatedFields_.size();
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public java.lang.String getAggregatedFields(int index) {
        return aggregatedFields_.get(index);
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public com.google.protobuf.ByteString
          getAggregatedFieldsBytes(int index) {
        return aggregatedFields_.getByteString(index);
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder setAggregatedFields(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregatedFieldsIsMutable();
        aggregatedFields_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder addAggregatedFields(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregatedFieldsIsMutable();
        aggregatedFields_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder addAllAggregatedFields(
          java.lang.Iterable<java.lang.String> values) {
        ensureAggregatedFieldsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, aggregatedFields_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder clearAggregatedFields() {
        aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder addAggregatedFieldsBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregatedFieldsIsMutable();
        aggregatedFields_.add(value);
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:AggregateRequest)
    }

    static {
      defaultInstance = new AggregateRequest(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:AggregateRequest)
  }

  public interface TimeSeriesAggregateRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:TimeSeriesAggregateRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    boolean hasEntityDefinition();
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    AggregateProtos.EntityDefinition getEntityDefinition();
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder();

    /**
     * <code>required .Scan scan = 2;</code>
     */
    boolean hasScan();
    /**
     * <code>required .Scan scan = 2;</code>
     */
    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan();
    /**
     * <code>required .Scan scan = 2;</code>
     */
    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder();

    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    com.google.protobuf.ProtocolStringList
        getGroupbyFieldsList();
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    int getGroupbyFieldsCount();
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    java.lang.String getGroupbyFields(int index);
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    com.google.protobuf.ByteString
        getGroupbyFieldsBytes(int index);

    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    java.util.List<com.google.protobuf.ByteString> getAggregateFuncTypesList();
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    int getAggregateFuncTypesCount();
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    com.google.protobuf.ByteString getAggregateFuncTypes(int index);

    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    com.google.protobuf.ProtocolStringList
        getAggregatedFieldsList();
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    int getAggregatedFieldsCount();
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    java.lang.String getAggregatedFields(int index);
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    com.google.protobuf.ByteString
        getAggregatedFieldsBytes(int index);

    /**
     * <code>required int64 start_time = 6;</code>
     */
    boolean hasStartTime();
    /**
     * <code>required int64 start_time = 6;</code>
     */
    long getStartTime();

    /**
     * <code>required int64 end_time = 7;</code>
     */
    boolean hasEndTime();
    /**
     * <code>required int64 end_time = 7;</code>
     */
    long getEndTime();

    /**
     * <code>required int64 interval_min = 8;</code>
     */
    boolean hasIntervalMin();
    /**
     * <code>required int64 interval_min = 8;</code>
     */
    long getIntervalMin();
  }
  /**
   * Protobuf type {@code TimeSeriesAggregateRequest}
   */
  public static final class TimeSeriesAggregateRequest extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:TimeSeriesAggregateRequest)
      TimeSeriesAggregateRequestOrBuilder {
    // Use TimeSeriesAggregateRequest.newBuilder() to construct.
    private TimeSeriesAggregateRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
      this.unknownFields = builder.getUnknownFields();
    }
    private TimeSeriesAggregateRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }

    private static final TimeSeriesAggregateRequest defaultInstance;
    public static TimeSeriesAggregateRequest getDefaultInstance() {
      return defaultInstance;
    }

    public TimeSeriesAggregateRequest getDefaultInstanceForType() {
      return defaultInstance;
    }

    private final com.google.protobuf.UnknownFieldSet unknownFields;
    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
        getUnknownFields() {
      return this.unknownFields;
    }
    private TimeSeriesAggregateRequest(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      initFields();
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              AggregateProtos.EntityDefinition.Builder subBuilder = null;
              if (((bitField0_ & 0x00000001) == 0x00000001)) {
                subBuilder = entityDefinition_.toBuilder();
              }
              entityDefinition_ = input.readMessage(AggregateProtos.EntityDefinition.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(entityDefinition_);
                entityDefinition_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000001;
              break;
            }
            case 18: {
              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder subBuilder = null;
              if (((bitField0_ & 0x00000002) == 0x00000002)) {
                subBuilder = scan_.toBuilder();
              }
              scan_ = input.readMessage(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(scan_);
                scan_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 26: {
              com.google.protobuf.ByteString bs = input.readBytes();
              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
                groupbyFields_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000004;
              }
              groupbyFields_.add(bs);
              break;
            }
            case 34: {
              if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
                aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
                mutable_bitField0_ |= 0x00000008;
              }
              aggregateFuncTypes_.add(input.readBytes());
              break;
            }
            case 42: {
              com.google.protobuf.ByteString bs = input.readBytes();
              if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
                aggregatedFields_ = new com.google.protobuf.LazyStringArrayList();
                mutable_bitField0_ |= 0x00000010;
              }
              aggregatedFields_.add(bs);
              break;
            }
            case 48: {
              bitField0_ |= 0x00000004;
              startTime_ = input.readInt64();
              break;
            }
            case 56: {
              bitField0_ |= 0x00000008;
              endTime_ = input.readInt64();
              break;
            }
            case 64: {
              bitField0_ |= 0x00000010;
              intervalMin_ = input.readInt64();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e.getMessage()).setUnfinishedMessage(this);
      } finally {
        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
          groupbyFields_ = groupbyFields_.getUnmodifiableView();
        }
        if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
          aggregateFuncTypes_ = java.util.Collections.unmodifiableList(aggregateFuncTypes_);
        }
        if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
          aggregatedFields_ = aggregatedFields_.getUnmodifiableView();
        }
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return AggregateProtos.internal_static_TimeSeriesAggregateRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return AggregateProtos.internal_static_TimeSeriesAggregateRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              AggregateProtos.TimeSeriesAggregateRequest.class, AggregateProtos.TimeSeriesAggregateRequest.Builder.class);
    }

    public static com.google.protobuf.Parser<TimeSeriesAggregateRequest> PARSER =
        new com.google.protobuf.AbstractParser<TimeSeriesAggregateRequest>() {
      public TimeSeriesAggregateRequest parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new TimeSeriesAggregateRequest(input, extensionRegistry);
      }
    };

    @java.lang.Override
    public com.google.protobuf.Parser<TimeSeriesAggregateRequest> getParserForType() {
      return PARSER;
    }

    private int bitField0_;
    public static final int ENTITY_DEFINITION_FIELD_NUMBER = 1;
    private AggregateProtos.EntityDefinition entityDefinition_;
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    public boolean hasEntityDefinition() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    public AggregateProtos.EntityDefinition getEntityDefinition() {
      return entityDefinition_;
    }
    /**
     * <code>required .EntityDefinition entity_definition = 1;</code>
     */
    public AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder() {
      return entityDefinition_;
    }

    public static final int SCAN_FIELD_NUMBER = 2;
    private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_;
    /**
     * <code>required .Scan scan = 2;</code>
     */
    public boolean hasScan() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>required .Scan scan = 2;</code>
     */
    public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
      return scan_;
    }
    /**
     * <code>required .Scan scan = 2;</code>
     */
    public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
      return scan_;
    }

    public static final int GROUPBY_FIELDS_FIELD_NUMBER = 3;
    private com.google.protobuf.LazyStringList groupbyFields_;
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getGroupbyFieldsList() {
      return groupbyFields_;
    }
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public int getGroupbyFieldsCount() {
      return groupbyFields_.size();
    }
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public java.lang.String getGroupbyFields(int index) {
      return groupbyFields_.get(index);
    }
    /**
     * <code>repeated string groupby_fields = 3;</code>
     */
    public com.google.protobuf.ByteString
        getGroupbyFieldsBytes(int index) {
      return groupbyFields_.getByteString(index);
    }

    public static final int AGGREGATE_FUNC_TYPES_FIELD_NUMBER = 4;
    private java.util.List<com.google.protobuf.ByteString> aggregateFuncTypes_;
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    public java.util.List<com.google.protobuf.ByteString>
        getAggregateFuncTypesList() {
      return aggregateFuncTypes_;
    }
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    public int getAggregateFuncTypesCount() {
      return aggregateFuncTypes_.size();
    }
    /**
     * <code>repeated bytes aggregate_func_types = 4;</code>
     */
    public com.google.protobuf.ByteString getAggregateFuncTypes(int index) {
      return aggregateFuncTypes_.get(index);
    }

    public static final int AGGREGATED_FIELDS_FIELD_NUMBER = 5;
    private com.google.protobuf.LazyStringList aggregatedFields_;
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getAggregatedFieldsList() {
      return aggregatedFields_;
    }
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public int getAggregatedFieldsCount() {
      return aggregatedFields_.size();
    }
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public java.lang.String getAggregatedFields(int index) {
      return aggregatedFields_.get(index);
    }
    /**
     * <code>repeated string aggregated_fields = 5;</code>
     */
    public com.google.protobuf.ByteString
        getAggregatedFieldsBytes(int index) {
      return aggregatedFields_.getByteString(index);
    }

    public static final int START_TIME_FIELD_NUMBER = 6;
    private long startTime_;
    /**
     * <code>required int64 start_time = 6;</code>
     */
    public boolean hasStartTime() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    /**
     * <code>required int64 start_time = 6;</code>
     */
    public long getStartTime() {
      return startTime_;
    }

    public static final int END_TIME_FIELD_NUMBER = 7;
    private long endTime_;
    /**
     * <code>required int64 end_time = 7;</code>
     */
    public boolean hasEndTime() {
      return ((bitField0_ & 0x00000008) == 0x00000008);
    }
    /**
     * <code>required int64 end_time = 7;</code>
     */
    public long getEndTime() {
      return endTime_;
    }

    public static final int INTERVAL_MIN_FIELD_NUMBER = 8;
    private long intervalMin_;
    /**
     * <code>required int64 interval_min = 8;</code>
     */
    public boolean hasIntervalMin() {
      return ((bitField0_ & 0x00000010) == 0x00000010);
    }
    /**
     * <code>required int64 interval_min = 8;</code>
     */
    public long getIntervalMin() {
      return intervalMin_;
    }

    private void initFields() {
      entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
      scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
      groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      aggregateFuncTypes_ = java.util.Collections.emptyList();
      aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      startTime_ = 0L;
      endTime_ = 0L;
      intervalMin_ = 0L;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      if (!hasEntityDefinition()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasScan()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasStartTime()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasEndTime()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasIntervalMin()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getEntityDefinition().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getScan().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, entityDefinition_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeMessage(2, scan_);
      }
      for (int i = 0; i < groupbyFields_.size(); i++) {
        output.writeBytes(3, groupbyFields_.getByteString(i));
      }
      for (int i = 0; i < aggregateFuncTypes_.size(); i++) {
        output.writeBytes(4, aggregateFuncTypes_.get(i));
      }
      for (int i = 0; i < aggregatedFields_.size(); i++) {
        output.writeBytes(5, aggregatedFields_.getByteString(i));
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeInt64(6, startTime_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        output.writeInt64(7, endTime_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        output.writeInt64(8, intervalMin_);
      }
      getUnknownFields().writeTo(output);
    }

    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, entityDefinition_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, scan_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < groupbyFields_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(groupbyFields_.getByteString(i));
        }
        size += dataSize;
        size += 1 * getGroupbyFieldsList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < aggregateFuncTypes_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(aggregateFuncTypes_.get(i));
        }
        size += dataSize;
        size += 1 * getAggregateFuncTypesList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < aggregatedFields_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(aggregatedFields_.getByteString(i));
        }
        size += dataSize;
        size += 1 * getAggregatedFieldsList().size();
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(6, startTime_);
      }
      if (((bitField0_ & 0x00000008) == 0x00000008)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(7, endTime_);
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(8, intervalMin_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof AggregateProtos.TimeSeriesAggregateRequest)) {
        return super.equals(obj);
      }
      AggregateProtos.TimeSeriesAggregateRequest other = (AggregateProtos.TimeSeriesAggregateRequest) obj;

      boolean result = true;
      result = result && (hasEntityDefinition() == other.hasEntityDefinition());
      if (hasEntityDefinition()) {
        result = result && getEntityDefinition()
            .equals(other.getEntityDefinition());
      }
      result = result && (hasScan() == other.hasScan());
      if (hasScan()) {
        result = result && getScan()
            .equals(other.getScan());
      }
      result = result && getGroupbyFieldsList()
          .equals(other.getGroupbyFieldsList());
      result = result && getAggregateFuncTypesList()
          .equals(other.getAggregateFuncTypesList());
      result = result && getAggregatedFieldsList()
          .equals(other.getAggregatedFieldsList());
      result = result && (hasStartTime() == other.hasStartTime());
      if (hasStartTime()) {
        result = result && (getStartTime()
            == other.getStartTime());
      }
      result = result && (hasEndTime() == other.hasEndTime());
      if (hasEndTime()) {
        result = result && (getEndTime()
            == other.getEndTime());
      }
      result = result && (hasIntervalMin() == other.hasIntervalMin());
      if (hasIntervalMin()) {
        result = result && (getIntervalMin()
            == other.getIntervalMin());
      }
      result = result &&
          getUnknownFields().equals(other.getUnknownFields());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptorForType().hashCode();
      if (hasEntityDefinition()) {
        hash = (37 * hash) + ENTITY_DEFINITION_FIELD_NUMBER;
        hash = (53 * hash) + getEntityDefinition().hashCode();
      }
      if (hasScan()) {
        hash = (37 * hash) + SCAN_FIELD_NUMBER;
        hash = (53 * hash) + getScan().hashCode();
      }
      if (getGroupbyFieldsCount() > 0) {
        hash = (37 * hash) + GROUPBY_FIELDS_FIELD_NUMBER;
        hash = (53 * hash) + getGroupbyFieldsList().hashCode();
      }
      if (getAggregateFuncTypesCount() > 0) {
        hash = (37 * hash) + AGGREGATE_FUNC_TYPES_FIELD_NUMBER;
        hash = (53 * hash) + getAggregateFuncTypesList().hashCode();
      }
      if (getAggregatedFieldsCount() > 0) {
        hash = (37 * hash) + AGGREGATED_FIELDS_FIELD_NUMBER;
        hash = (53 * hash) + getAggregatedFieldsList().hashCode();
      }
      if (hasStartTime()) {
        hash = (37 * hash) + START_TIME_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getStartTime());
      }
      if (hasEndTime()) {
        hash = (37 * hash) + END_TIME_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getEndTime());
      }
      if (hasIntervalMin()) {
        hash = (37 * hash) + INTERVAL_MIN_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getIntervalMin());
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseDelimitedFrom(input, extensionRegistry);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return PARSER.parseFrom(input);
    }
    public static AggregateProtos.TimeSeriesAggregateRequest parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return PARSER.parseFrom(input, extensionRegistry);
    }

    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(AggregateProtos.TimeSeriesAggregateRequest prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code TimeSeriesAggregateRequest}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:TimeSeriesAggregateRequest)
        AggregateProtos.TimeSeriesAggregateRequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return AggregateProtos.internal_static_TimeSeriesAggregateRequest_descriptor;
      }

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return AggregateProtos.internal_static_TimeSeriesAggregateRequest_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                AggregateProtos.TimeSeriesAggregateRequest.class, AggregateProtos.TimeSeriesAggregateRequest.Builder.class);
      }

      // Construct using eagle.storage.hbase.query.coprocessor.generated.AggregateProtos.TimeSeriesAggregateRequest.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
          getEntityDefinitionFieldBuilder();
          getScanFieldBuilder();
        }
      }
      private static Builder create() {
        return new Builder();
      }

      public Builder clear() {
        super.clear();
        if (entityDefinitionBuilder_ == null) {
          entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
        } else {
          entityDefinitionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        if (scanBuilder_ == null) {
          scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
        } else {
          scanBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000004);
        aggregateFuncTypes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        startTime_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000020);
        endTime_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000040);
        intervalMin_ = 0L;
        bitField0_ = (bitField0_ & ~0x00000080);
        return this;
      }

      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return AggregateProtos.internal_static_TimeSeriesAggregateRequest_descriptor;
      }

      public AggregateProtos.TimeSeriesAggregateRequest getDefaultInstanceForType() {
        return AggregateProtos.TimeSeriesAggregateRequest.getDefaultInstance();
      }

      public AggregateProtos.TimeSeriesAggregateRequest build() {
        AggregateProtos.TimeSeriesAggregateRequest result = buildPartial();
        if (!result.isInitialized()) {
          throw AbstractMessage.Builder.newUninitializedMessageException(result);
        }
        return result;
      }

      public AggregateProtos.TimeSeriesAggregateRequest buildPartial() {
        AggregateProtos.TimeSeriesAggregateRequest result = new AggregateProtos.TimeSeriesAggregateRequest(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        if (entityDefinitionBuilder_ == null) {
          result.entityDefinition_ = entityDefinition_;
        } else {
          result.entityDefinition_ = entityDefinitionBuilder_.build();
        }
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        if (scanBuilder_ == null) {
          result.scan_ = scan_;
        } else {
          result.scan_ = scanBuilder_.build();
        }
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          groupbyFields_ = groupbyFields_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.groupbyFields_ = groupbyFields_;
        if (((bitField0_ & 0x00000008) == 0x00000008)) {
          aggregateFuncTypes_ = java.util.Collections.unmodifiableList(aggregateFuncTypes_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.aggregateFuncTypes_ = aggregateFuncTypes_;
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          aggregatedFields_ = aggregatedFields_.getUnmodifiableView();
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.aggregatedFields_ = aggregatedFields_;
        if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
          to_bitField0_ |= 0x00000004;
        }
        result.startTime_ = startTime_;
        if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
          to_bitField0_ |= 0x00000008;
        }
        result.endTime_ = endTime_;
        if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
          to_bitField0_ |= 0x00000010;
        }
        result.intervalMin_ = intervalMin_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof AggregateProtos.TimeSeriesAggregateRequest) {
          return mergeFrom((AggregateProtos.TimeSeriesAggregateRequest)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(AggregateProtos.TimeSeriesAggregateRequest other) {
        if (other == AggregateProtos.TimeSeriesAggregateRequest.getDefaultInstance()) return this;
        if (other.hasEntityDefinition()) {
          mergeEntityDefinition(other.getEntityDefinition());
        }
        if (other.hasScan()) {
          mergeScan(other.getScan());
        }
        if (!other.groupbyFields_.isEmpty()) {
          if (groupbyFields_.isEmpty()) {
            groupbyFields_ = other.groupbyFields_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureGroupbyFieldsIsMutable();
            groupbyFields_.addAll(other.groupbyFields_);
          }
          onChanged();
        }
        if (!other.aggregateFuncTypes_.isEmpty()) {
          if (aggregateFuncTypes_.isEmpty()) {
            aggregateFuncTypes_ = other.aggregateFuncTypes_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureAggregateFuncTypesIsMutable();
            aggregateFuncTypes_.addAll(other.aggregateFuncTypes_);
          }
          onChanged();
        }
        if (!other.aggregatedFields_.isEmpty()) {
          if (aggregatedFields_.isEmpty()) {
            aggregatedFields_ = other.aggregatedFields_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureAggregatedFieldsIsMutable();
            aggregatedFields_.addAll(other.aggregatedFields_);
          }
          onChanged();
        }
        if (other.hasStartTime()) {
          setStartTime(other.getStartTime());
        }
        if (other.hasEndTime()) {
          setEndTime(other.getEndTime());
        }
        if (other.hasIntervalMin()) {
          setIntervalMin(other.getIntervalMin());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }

      public final boolean isInitialized() {
        if (!hasEntityDefinition()) {
          
          return false;
        }
        if (!hasScan()) {
          
          return false;
        }
        if (!hasStartTime()) {
          
          return false;
        }
        if (!hasEndTime()) {
          
          return false;
        }
        if (!hasIntervalMin()) {
          
          return false;
        }
        if (!getEntityDefinition().isInitialized()) {
          
          return false;
        }
        if (!getScan().isInitialized()) {
          
          return false;
        }
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        AggregateProtos.TimeSeriesAggregateRequest parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (AggregateProtos.TimeSeriesAggregateRequest) e.getUnfinishedMessage();
          throw e;
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private AggregateProtos.EntityDefinition entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder> entityDefinitionBuilder_;
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public boolean hasEntityDefinition() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public AggregateProtos.EntityDefinition getEntityDefinition() {
        if (entityDefinitionBuilder_ == null) {
          return entityDefinition_;
        } else {
          return entityDefinitionBuilder_.getMessage();
        }
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder setEntityDefinition(AggregateProtos.EntityDefinition value) {
        if (entityDefinitionBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          entityDefinition_ = value;
          onChanged();
        } else {
          entityDefinitionBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder setEntityDefinition(
          AggregateProtos.EntityDefinition.Builder builderForValue) {
        if (entityDefinitionBuilder_ == null) {
          entityDefinition_ = builderForValue.build();
          onChanged();
        } else {
          entityDefinitionBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder mergeEntityDefinition(AggregateProtos.EntityDefinition value) {
        if (entityDefinitionBuilder_ == null) {
          if (((bitField0_ & 0x00000001) == 0x00000001) &&
              entityDefinition_ != AggregateProtos.EntityDefinition.getDefaultInstance()) {
            entityDefinition_ =
              AggregateProtos.EntityDefinition.newBuilder(entityDefinition_).mergeFrom(value).buildPartial();
          } else {
            entityDefinition_ = value;
          }
          onChanged();
        } else {
          entityDefinitionBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public Builder clearEntityDefinition() {
        if (entityDefinitionBuilder_ == null) {
          entityDefinition_ = AggregateProtos.EntityDefinition.getDefaultInstance();
          onChanged();
        } else {
          entityDefinitionBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public AggregateProtos.EntityDefinition.Builder getEntityDefinitionBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getEntityDefinitionFieldBuilder().getBuilder();
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      public AggregateProtos.EntityDefinitionOrBuilder getEntityDefinitionOrBuilder() {
        if (entityDefinitionBuilder_ != null) {
          return entityDefinitionBuilder_.getMessageOrBuilder();
        } else {
          return entityDefinition_;
        }
      }
      /**
       * <code>required .EntityDefinition entity_definition = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder>
          getEntityDefinitionFieldBuilder() {
        if (entityDefinitionBuilder_ == null) {
          entityDefinitionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              AggregateProtos.EntityDefinition, AggregateProtos.EntityDefinition.Builder, AggregateProtos.EntityDefinitionOrBuilder>(
                  getEntityDefinition(),
                  getParentForChildren(),
                  isClean());
          entityDefinition_ = null;
        }
        return entityDefinitionBuilder_;
      }

      private org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> scanBuilder_;
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public boolean hasScan() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan getScan() {
        if (scanBuilder_ == null) {
          return scan_;
        } else {
          return scanBuilder_.getMessage();
        }
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder setScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
        if (scanBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          scan_ = value;
          onChanged();
        } else {
          scanBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder setScan(
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder builderForValue) {
        if (scanBuilder_ == null) {
          scan_ = builderForValue.build();
          onChanged();
        } else {
          scanBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder mergeScan(org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan value) {
        if (scanBuilder_ == null) {
          if (((bitField0_ & 0x00000002) == 0x00000002) &&
              scan_ != org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance()) {
            scan_ =
              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.newBuilder(scan_).mergeFrom(value).buildPartial();
          } else {
            scan_ = value;
          }
          onChanged();
        } else {
          scanBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public Builder clearScan() {
        if (scanBuilder_ == null) {
          scan_ = org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.getDefaultInstance();
          onChanged();
        } else {
          scanBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder getScanBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getScanFieldBuilder().getBuilder();
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      public org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder getScanOrBuilder() {
        if (scanBuilder_ != null) {
          return scanBuilder_.getMessageOrBuilder();
        } else {
          return scan_;
        }
      }
      /**
       * <code>required .Scan scan = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder> 
          getScanFieldBuilder() {
        if (scanBuilder_ == null) {
          scanBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Scan.Builder, org.apache.hadoop.hbase.protobuf.generated.ClientProtos.ScanOrBuilder>(
                  getScan(),
                  getParentForChildren(),
                  isClean());
          scan_ = null;
        }
        return scanBuilder_;
      }

      private com.google.protobuf.LazyStringList groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureGroupbyFieldsIsMutable() {
        if (!((bitField0_ & 0x00000004) == 0x00000004)) {
          groupbyFields_ = new com.google.protobuf.LazyStringArrayList(groupbyFields_);
          bitField0_ |= 0x00000004;
         }
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getGroupbyFieldsList() {
        return groupbyFields_.getUnmodifiableView();
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public int getGroupbyFieldsCount() {
        return groupbyFields_.size();
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public java.lang.String getGroupbyFields(int index) {
        return groupbyFields_.get(index);
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public com.google.protobuf.ByteString
          getGroupbyFieldsBytes(int index) {
        return groupbyFields_.getByteString(index);
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder setGroupbyFields(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupbyFieldsIsMutable();
        groupbyFields_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder addGroupbyFields(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupbyFieldsIsMutable();
        groupbyFields_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder addAllGroupbyFields(
          java.lang.Iterable<java.lang.String> values) {
        ensureGroupbyFieldsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, groupbyFields_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder clearGroupbyFields() {
        groupbyFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string groupby_fields = 3;</code>
       */
      public Builder addGroupbyFieldsBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupbyFieldsIsMutable();
        groupbyFields_.add(value);
        onChanged();
        return this;
      }

      private java.util.List<com.google.protobuf.ByteString> aggregateFuncTypes_ = java.util.Collections.emptyList();
      private void ensureAggregateFuncTypesIsMutable() {
        if (!((bitField0_ & 0x00000008) == 0x00000008)) {
          aggregateFuncTypes_ = new java.util.ArrayList<com.google.protobuf.ByteString>(aggregateFuncTypes_);
          bitField0_ |= 0x00000008;
         }
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public java.util.List<com.google.protobuf.ByteString>
          getAggregateFuncTypesList() {
        return java.util.Collections.unmodifiableList(aggregateFuncTypes_);
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public int getAggregateFuncTypesCount() {
        return aggregateFuncTypes_.size();
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public com.google.protobuf.ByteString getAggregateFuncTypes(int index) {
        return aggregateFuncTypes_.get(index);
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder setAggregateFuncTypes(
          int index, com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregateFuncTypesIsMutable();
        aggregateFuncTypes_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder addAggregateFuncTypes(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregateFuncTypesIsMutable();
        aggregateFuncTypes_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder addAllAggregateFuncTypes(
          java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
        ensureAggregateFuncTypesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, aggregateFuncTypes_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated bytes aggregate_func_types = 4;</code>
       */
      public Builder clearAggregateFuncTypes() {
        aggregateFuncTypes_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
        return this;
      }

      private com.google.protobuf.LazyStringList aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureAggregatedFieldsIsMutable() {
        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
          aggregatedFields_ = new com.google.protobuf.LazyStringArrayList(aggregatedFields_);
          bitField0_ |= 0x00000010;
         }
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public com.google.protobuf.ProtocolStringList
          getAggregatedFieldsList() {
        return aggregatedFields_.getUnmodifiableView();
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public int getAggregatedFieldsCount() {
        return aggregatedFields_.size();
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public java.lang.String getAggregatedFields(int index) {
        return aggregatedFields_.get(index);
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public com.google.protobuf.ByteString
          getAggregatedFieldsBytes(int index) {
        return aggregatedFields_.getByteString(index);
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder setAggregatedFields(
          int index, java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregatedFieldsIsMutable();
        aggregatedFields_.set(index, value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder addAggregatedFields(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregatedFieldsIsMutable();
        aggregatedFields_.add(value);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder addAllAggregatedFields(
          java.lang.Iterable<java.lang.String> values) {
        ensureAggregatedFieldsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, aggregatedFields_);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder clearAggregatedFields() {
        aggregatedFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
        return this;
      }
      /**
       * <code>repeated string aggregated_fields = 5;</code>
       */
      public Builder addAggregatedFieldsBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureAggregatedFieldsIsMutable();
        aggregatedFields_.add(value);
        onChanged();
        return this;
      }

      private long startTime_ ;
      /**
       * <code>required int64 start_time = 6;</code>
       */
      public boolean hasStartTime() {
        return ((bitField0_ & 0x00000020) == 0x00000020);
      }
      /**
       * <code>required int64 start_time = 6;</code>
       */
      public long getStartTime() {
        return startTime_;
      }
      /**
       * <code>required int64 start_time = 6;</code>
       */
      public Builder setStartTime(long value) {
        bitField0_ |= 0x00000020;
        startTime_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required int64 start_time = 6;</code>
       */
      public Builder clearStartTime() {
        bitField0_ = (bitField0_ & ~0x00000020);
        startTime_ = 0L;
        onChanged();
        return this;
      }

      private long endTime_ ;
      /**
       * <code>required int64 end_time = 7;</code>
       */
      public boolean hasEndTime() {
        return ((bitField0_ & 0x00000040) == 0x00000040);
      }
      /**
       * <code>required int64 end_time = 7;</code>
       */
      public long getEndTime() {
        return endTime_;
      }
      /**
       * <code>required int64 end_time = 7;</code>
       */
      public Builder setEndTime(long value) {
        bitField0_ |= 0x00000040;
        endTime_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required int64 end_time = 7;</code>
       */
      public Builder clearEndTime() {
        bitField0_ = (bitField0_ & ~0x00000040);
        endTime_ = 0L;
        onChanged();
        return this;
      }

      private long intervalMin_ ;
      /**
       * <code>required int64 interval_min = 8;</code>
       */
      public boolean hasIntervalMin() {
        return ((bitField0_ & 0x00000080) == 0x00000080);
      }
      /**
       * <code>required int64 interval_min = 8;</code>
       */
      public long getIntervalMin() {
        return intervalMin_;
      }
      /**
       * <code>required int64 interval_min = 8;</code>
       */
      public Builder setIntervalMin(long value) {
        bitField0_ |= 0x00000080;
        intervalMin_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>required int64 interval_min = 8;</code>
       */
      public Builder clearIntervalMin() {
        bitField0_ = (bitField0_ & ~0x00000080);
        intervalMin_ = 0L;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:TimeSeriesAggregateRequest)
    }

    static {
      defaultInstance = new TimeSeriesAggregateRequest(true);
      defaultInstance.initFields();
    }

    // @@protoc_insertion_point(class_scope:TimeSeriesAggregateRequest)
  }

  /**
   * Protobuf service {@code AggregateProtocol}
   */
  public static abstract class AggregateProtocol
      implements com.google.protobuf.Service {
    protected AggregateProtocol() {}

    public interface Interface {
      /**
       * <code>rpc aggregate(.AggregateRequest) returns (.AggregateResult);</code>
       */
      public abstract void aggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.AggregateRequest request,
          com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done);

      /**
       * <code>rpc timeseriesAggregate(.TimeSeriesAggregateRequest) returns (.AggregateResult);</code>
       */
      public abstract void timeseriesAggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.TimeSeriesAggregateRequest request,
          com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done);

    }

    public static com.google.protobuf.Service newReflectiveService(
        final Interface impl) {
      return new AggregateProtocol() {
        @java.lang.Override
        public  void aggregate(
            com.google.protobuf.RpcController controller,
            AggregateProtos.AggregateRequest request,
            com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done) {
          impl.aggregate(controller, request, done);
        }

        @java.lang.Override
        public  void timeseriesAggregate(
            com.google.protobuf.RpcController controller,
            AggregateProtos.TimeSeriesAggregateRequest request,
            com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done) {
          impl.timeseriesAggregate(controller, request, done);
        }

      };
    }

    public static com.google.protobuf.BlockingService
        newReflectiveBlockingService(final BlockingInterface impl) {
      return new com.google.protobuf.BlockingService() {
        public final com.google.protobuf.Descriptors.ServiceDescriptor
            getDescriptorForType() {
          return getDescriptor();
        }

        public final com.google.protobuf.Message callBlockingMethod(
            com.google.protobuf.Descriptors.MethodDescriptor method,
            com.google.protobuf.RpcController controller,
            com.google.protobuf.Message request)
            throws com.google.protobuf.ServiceException {
          if (method.getService() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "Service.callBlockingMethod() given method descriptor for " +
              "wrong service type.");
          }
          switch(method.getIndex()) {
            case 0:
              return impl.aggregate(controller, (AggregateProtos.AggregateRequest)request);
            case 1:
              return impl.timeseriesAggregate(controller, (AggregateProtos.TimeSeriesAggregateRequest)request);
            default:
              throw new java.lang.AssertionError("Can't get here.");
          }
        }

        public final com.google.protobuf.Message
            getRequestPrototype(
            com.google.protobuf.Descriptors.MethodDescriptor method) {
          if (method.getService() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "Service.getRequestPrototype() given method " +
              "descriptor for wrong service type.");
          }
          switch(method.getIndex()) {
            case 0:
              return AggregateProtos.AggregateRequest.getDefaultInstance();
            case 1:
              return AggregateProtos.TimeSeriesAggregateRequest.getDefaultInstance();
            default:
              throw new java.lang.AssertionError("Can't get here.");
          }
        }

        public final com.google.protobuf.Message
            getResponsePrototype(
            com.google.protobuf.Descriptors.MethodDescriptor method) {
          if (method.getService() != getDescriptor()) {
            throw new java.lang.IllegalArgumentException(
              "Service.getResponsePrototype() given method " +
              "descriptor for wrong service type.");
          }
          switch(method.getIndex()) {
            case 0:
              return AggregateProtos.AggregateResult.getDefaultInstance();
            case 1:
              return AggregateProtos.AggregateResult.getDefaultInstance();
            default:
              throw new java.lang.AssertionError("Can't get here.");
          }
        }

      };
    }

    /**
     * <code>rpc aggregate(.AggregateRequest) returns (.AggregateResult);</code>
     */
    public abstract void aggregate(
        com.google.protobuf.RpcController controller,
        AggregateProtos.AggregateRequest request,
        com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done);

    /**
     * <code>rpc timeseriesAggregate(.TimeSeriesAggregateRequest) returns (.AggregateResult);</code>
     */
    public abstract void timeseriesAggregate(
        com.google.protobuf.RpcController controller,
        AggregateProtos.TimeSeriesAggregateRequest request,
        com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done);

    public static final
        com.google.protobuf.Descriptors.ServiceDescriptor
        getDescriptor() {
      return AggregateProtos.getDescriptor().getServices().get(0);
    }
    public final com.google.protobuf.Descriptors.ServiceDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }

    public final void callMethod(
        com.google.protobuf.Descriptors.MethodDescriptor method,
        com.google.protobuf.RpcController controller,
        com.google.protobuf.Message request,
        com.google.protobuf.RpcCallback<
          com.google.protobuf.Message> done) {
      if (method.getService() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "Service.callMethod() given method descriptor for wrong " +
          "service type.");
      }
      switch(method.getIndex()) {
        case 0:
          this.aggregate(controller, (AggregateProtos.AggregateRequest)request,
            com.google.protobuf.RpcUtil.<AggregateProtos.AggregateResult>specializeCallback(
              done));
          return;
        case 1:
          this.timeseriesAggregate(controller, (AggregateProtos.TimeSeriesAggregateRequest)request,
            com.google.protobuf.RpcUtil.<AggregateProtos.AggregateResult>specializeCallback(
              done));
          return;
        default:
          throw new java.lang.AssertionError("Can't get here.");
      }
    }

    public final com.google.protobuf.Message
        getRequestPrototype(
        com.google.protobuf.Descriptors.MethodDescriptor method) {
      if (method.getService() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "Service.getRequestPrototype() given method " +
          "descriptor for wrong service type.");
      }
      switch(method.getIndex()) {
        case 0:
          return AggregateProtos.AggregateRequest.getDefaultInstance();
        case 1:
          return AggregateProtos.TimeSeriesAggregateRequest.getDefaultInstance();
        default:
          throw new java.lang.AssertionError("Can't get here.");
      }
    }

    public final com.google.protobuf.Message
        getResponsePrototype(
        com.google.protobuf.Descriptors.MethodDescriptor method) {
      if (method.getService() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "Service.getResponsePrototype() given method " +
          "descriptor for wrong service type.");
      }
      switch(method.getIndex()) {
        case 0:
          return AggregateProtos.AggregateResult.getDefaultInstance();
        case 1:
          return AggregateProtos.AggregateResult.getDefaultInstance();
        default:
          throw new java.lang.AssertionError("Can't get here.");
      }
    }

    public static Stub newStub(
        com.google.protobuf.RpcChannel channel) {
      return new Stub(channel);
    }

    public static final class Stub extends AggregateProtos.AggregateProtocol implements Interface {
      private Stub(com.google.protobuf.RpcChannel channel) {
        this.channel = channel;
      }

      private final com.google.protobuf.RpcChannel channel;

      public com.google.protobuf.RpcChannel getChannel() {
        return channel;
      }

      public  void aggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.AggregateRequest request,
          com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done) {
        channel.callMethod(
          getDescriptor().getMethods().get(0),
          controller,
          request,
          AggregateProtos.AggregateResult.getDefaultInstance(),
          com.google.protobuf.RpcUtil.generalizeCallback(
            done,
            AggregateProtos.AggregateResult.class,
            AggregateProtos.AggregateResult.getDefaultInstance()));
      }

      public  void timeseriesAggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.TimeSeriesAggregateRequest request,
          com.google.protobuf.RpcCallback<AggregateProtos.AggregateResult> done) {
        channel.callMethod(
          getDescriptor().getMethods().get(1),
          controller,
          request,
          AggregateProtos.AggregateResult.getDefaultInstance(),
          com.google.protobuf.RpcUtil.generalizeCallback(
            done,
            AggregateProtos.AggregateResult.class,
            AggregateProtos.AggregateResult.getDefaultInstance()));
      }
    }

    public static BlockingInterface newBlockingStub(
        com.google.protobuf.BlockingRpcChannel channel) {
      return new BlockingStub(channel);
    }

    public interface BlockingInterface {
      public AggregateProtos.AggregateResult aggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.AggregateRequest request)
          throws com.google.protobuf.ServiceException;

      public AggregateProtos.AggregateResult timeseriesAggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.TimeSeriesAggregateRequest request)
          throws com.google.protobuf.ServiceException;
    }

    private static final class BlockingStub implements BlockingInterface {
      private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
        this.channel = channel;
      }

      private final com.google.protobuf.BlockingRpcChannel channel;

      public AggregateProtos.AggregateResult aggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.AggregateRequest request)
          throws com.google.protobuf.ServiceException {
        return (AggregateProtos.AggregateResult) channel.callBlockingMethod(
          getDescriptor().getMethods().get(0),
          controller,
          request,
          AggregateProtos.AggregateResult.getDefaultInstance());
      }


      public AggregateProtos.AggregateResult timeseriesAggregate(
          com.google.protobuf.RpcController controller,
          AggregateProtos.TimeSeriesAggregateRequest request)
          throws com.google.protobuf.ServiceException {
        return (AggregateProtos.AggregateResult) channel.callBlockingMethod(
          getDescriptor().getMethods().get(1),
          controller,
          request,
          AggregateProtos.AggregateResult.getDefaultInstance());
      }

    }

    // @@protoc_insertion_point(class_scope:AggregateProtocol)
  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_EntityDefinition_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_EntityDefinition_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_AggregateResult_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_AggregateResult_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_AggregateRequest_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_AggregateRequest_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_TimeSeriesAggregateRequest_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_TimeSeriesAggregateRequest_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\027AggregateProtocol.proto\032\014Client.proto\"" +
      "&\n\020EntityDefinition\022\022\n\nbyte_array\030\001 \002(\014\"" +
      "%\n\017AggregateResult\022\022\n\nbyte_array\030\001 \002(\014\"\246" +
      "\001\n\020AggregateRequest\022,\n\021entity_definition" +
      "\030\001 \002(\0132\021.EntityDefinition\022\023\n\004scan\030\002 \002(\0132" +
      "\005.Scan\022\026\n\016groupby_fields\030\003 \003(\t\022\034\n\024aggreg" +
      "ate_func_types\030\004 \003(\014\022\031\n\021aggregated_field" +
      "s\030\005 \003(\t\"\354\001\n\032TimeSeriesAggregateRequest\022," +
      "\n\021entity_definition\030\001 \002(\0132\021.EntityDefini" +
      "tion\022\023\n\004scan\030\002 \002(\0132\005.Scan\022\026\n\016groupby_fie",
      "lds\030\003 \003(\t\022\034\n\024aggregate_func_types\030\004 \003(\014\022" +
      "\031\n\021aggregated_fields\030\005 \003(\t\022\022\n\nstart_time" +
      "\030\006 \002(\003\022\020\n\010end_time\030\007 \002(\003\022\024\n\014interval_min" +
      "\030\010 \002(\0032\213\001\n\021AggregateProtocol\0220\n\taggregat" +
      "e\022\021.AggregateRequest\032\020.AggregateResult\022D" +
      "\n\023timeseriesAggregate\022\033.TimeSeriesAggreg" +
      "ateRequest\032\020.AggregateResultBS\n8com.company1" +
      ".eagle.storage.hbase.query.coprocessor.g" +
      "eneratedB\017AggregateProtosH\001\210\001\001\240\001\001"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
          org.apache.hadoop.hbase.protobuf.generated.ClientProtos.getDescriptor(),
        }, assigner);
    internal_static_EntityDefinition_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_EntityDefinition_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_EntityDefinition_descriptor,
        new java.lang.String[] { "ByteArray", });
    internal_static_AggregateResult_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_AggregateResult_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_AggregateResult_descriptor,
        new java.lang.String[] { "ByteArray", });
    internal_static_AggregateRequest_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_AggregateRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_AggregateRequest_descriptor,
        new java.lang.String[] { "EntityDefinition", "Scan", "GroupbyFields", "AggregateFuncTypes", "AggregatedFields", });
    internal_static_TimeSeriesAggregateRequest_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_TimeSeriesAggregateRequest_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
        internal_static_TimeSeriesAggregateRequest_descriptor,
        new java.lang.String[] { "EntityDefinition", "Scan", "GroupbyFields", "AggregateFuncTypes", "AggregatedFields", "StartTime", "EndTime", "IntervalMin", });
    org.apache.hadoop.hbase.protobuf.generated.ClientProtos.getDescriptor();
  }

  // @@protoc_insertion_point(outer_class_scope)
}
